package ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2025-02-27
 * Time: 18:34
 */
public class test {
    public static void main(String[] args) {
        ArrayList arrayList = new ArrayList();
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(3);
        arrayList.add(4);
        arrayList.add(5);

        arrayList.add(1,15);
        arrayList.add(1,115);
        arrayList.add(2,100);
        /*arrayList.add(-1,2);*/
//        arrayList.add(10,1);
//        System.out.println(arrayList.get(8));
        arrayList.set(0,100);
        arrayList.set(8,50);
//        arrayList.set(9,100);
        arrayList.display();
        System.out.println("\n" + arrayList.size());
    }
    public static void main1(String[] args) {
        ArrayList arrayList = new ArrayList();
        System.out.println(arrayList.size());
        arrayList.display();

    }
}
